<?php
namespace app\index\controller;
use Qiniu\Auth;
use qqApi\api\Oauth;
use think\Controller;
use qqApi\api\QC;
class QLogin extends Controller
{
    /**
     * @var QC
     */
    public function qqLogin(){
        $qq = new Oauth();
        $qq->qq_login();

    }

    // qq登录回调函数
    public function qqcallback(){
        $qq = new QC();
        $access_token = $qq->qq_callback();
        $openid = $qq->get_openid();
        $qq = new QC($access_token,$openid);
        $datas = $qq->get_user_info();
        var_dump($datas);//为用户数据
    }
}
